Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CallbackConverter code #858

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

davidhewitt
Copy link
Member

This is the portion of #797 which is related to CallbackConverter changes.

It makes use of a run_callback function, which takes a closure to execute. The closure must return a PyResult.

A change of this fashion was originally necessary for #797. However I think it's good independent of #797, because a lot of the code is easier to read after these changes (in my opinion). Many match statements have been replaced with ? as a result.

I factored this out because I think #797 still might need more design before we can settle.

Now shorter and allows use of the ? operator inside callback code
@kngwyu
Copy link
Member

kngwyu commented Apr 9, 2020

Thank you for doing all this hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants